/*
 * (C) 2014-2015 Alibaba Group Holding Limited
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 *
 *     __  ___   ______        ___       __          ___
 *    |  |/  /  /  __  \      /   \     |  |        /   \
 *    |  '  /  |  |  |  |    /  ^  \    |  |       /  ^  \
 *    |    <   |  |  |  |   /  /_\  \   |  |      /  /_\  \
 *    |  .  \  |  `--'  |  /  _____  \  |  `----./  _____  \
 *    |__|\__\  \______/  /__/     \__\ |_______/__/     \__\
 *
 *
 *
 */
//
// Created by KOALA TEAM on 12/19/14.
//

#import <UIKit/UIKit.h>

#ifndef KLRGB
#define KLRGB(r, g, b)  [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1]
#endif

#ifndef KLRGBA
#define KLRGBA(r, g, b, a)  [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
#endif

#ifndef KLRGB_HEXSTR
#define KLRGB_HEXSTR(hex_str) [UIColor colorWithHexString:hex_str]
#endif

#ifndef KLRGB_HEX
#define KLRGB_HEX(V)		[UIColor colorWithRGBHexValue:V andAlpha:1.0]
#endif

#ifndef KLRGBA_HEX
#define KLRGBA_HEX(V, A)	[UIColor colorWithRGBHexValue:V andAlpha:A]
#endif


#pragma mark -

@interface UIColor (KLColorWithHex)

+(UIColor*)colorWithRGBHexValue:(uint)hexValue andAlpha:(float)alpha;
+(UIColor*)colorWithRGBHexString:(NSString *)hexString andAlpha:(float)alpha;
+(UIColor *)colorWithHexString: (NSString *) hexString ;


@end
